# Maintainer: Levente Polyak <levente[at]leventepolyak[dot]net>
# Contributor: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>

pkgname=vit
pkgver=2.3.1
pkgrel=1
pkgdesc='Terminal interface for Taskwarrior with Vim key bindings and colorization'
url='https://github.com/vit-project/vit'
arch=('any')
license=('MIT')
depends=('task' 'python' 'python-urwid' 'python-tasklib')
makedepends=('python-setuptools')
source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('4de2a2036635d5656245a7f03d503090e2aecacacfb226daa65f2634c7ee8489')
b2sums=('8b03da6e32382d4a286f369c9aadc1f3978ef00afe5b23e3ebc26b8667b635d5fcb7e3ed3f877ccdf0512ae6aa8452c636e1efab83e2f0d76abf067256efa23d')

build() {
  cd ${pkgname}-${pkgver}
  python setup.py build
}

check() {
  cd ${pkgname}-${pkgver}
  # TODO: requires python-terminal
  # ./run-tests.sh
}

package() {
  cd ${pkgname}-${pkgver}
  python setup.py install --root="${pkgdir}" -O1 --skip-build
  install -Dm 644 scripts/bash/vit.bash_completion "${pkgdir}/usr/share/bash-completion/completions/vit"
  install -Dm 644 *.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
